
<html><HEAD>
<LINK REL=STYLESHEET HREF="default.css" TYPE="text/css">
<TITLE>
Inserting controls in a window </TITLE>
</HEAD>
<BODY>

<!-- Header -->
<p class="ancestor" align="right"><A HREF="pbugp99.htm">Previous</A>&nbsp;&nbsp;<A HREF="pbugp101.htm" >Next</A>
<!-- End Header -->
<A NAME="X-REF343931324"></A><h1>Inserting controls in a window </h1>
<A NAME="TI2660"></A><p>You insert controls in a window in the Window painter.</p>
<A NAME="TI2661"></A><p><img src="images/proc.gif" width=17 height=17 border=0 align="bottom" alt="Steps"> To insert a control in a window:</p>
<ol><li class=fi><p>Select Insert&gt;Control from the
menu bar, or display the Controls drop-down toolbar on
the PainterBar. </p></li>
<li class=ds><p>Select the control you want to insert.</p><p>If you select User Object, the Select Object dialog box displays
listing all user objects defined for the application. Select the
library and the user object and click OK.</p></li>
<li class=ds><p>In the Layout view, click where you want the control.</p></li></ol>
<br><A NAME="TI2662"></A><p>After you insert the control, you can size it, move it, define
its appearance and behavior, and create scripts for its events.</p>
<A NAME="TI2663"></A><h4>Duplicating controls</h4>
<A NAME="TI2664"></A><p>To place multiple controls of the same type in a window, place
a control in the window and make sure it is selected. Then press
Ctrl+T or select Duplicate from the pop-up menu once for
each duplicate control you want to place in the window. The controls
are placed one under another. You can drag them to other locations
if you want.</p>
<A NAME="TI2665"></A><h4>Inserting controls with undefined content</h4>
<A NAME="TI2666"></A><p>When you insert a DataWindow, Picture, PictureButton, or PictureHyperLink control
in a window, you are inserting only the control. You see only an
empty box for a DataWindow control, the dotted outline of a box
for Picture and PictureHyperLink controls, and a large button resembling
a CommandButton for a PictureButton control. You must specify a
DataWindow object or picture later.</p>
<p><img src="images/note.gif" width=17 height=17 border=0 align="bottom" alt="Note"> <span class=shaded>Dragging and dropping DataWindow objects</span> <A NAME="TI2667"></A>You can insert a DataWindow control with a predefined DataWindow
object in a window by dragging the DataWindow object from the System
Tree to the window's Layout view.</p>
<A NAME="TI2668"></A><h4>Placing OLE controls</h4>
<A NAME="TI2669"></A><p>You can place objects from applications that support OLE,
such as Excel worksheets and Visio drawings, in your windows. For information
about using OLE with PowerBuilder, see <i>Application Techniques</i>
.</p>

